package single.shop.core.spring;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 *  扩展Spring容器, bean初始化事件处理器
 * 
 * @author Yinyt
 *
 */
public class ShopBeanPostProcessor implements BeanPostProcessor
{

	/**
	 * @implements BeanPostProcessor
	 */
	@Override
	public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException
	{
		System.out.println("AfterInitialization:"+bean+";beanName is:"+beanName);
		return bean;
	}

	/**
	 * @implements BeanPostProcessor
	 */
	@Override
	public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException
	{
		System.out.println("BeforeInitialization:"+bean+";beanName is:"+beanName);
		return bean;
	}

	
}
